from django.db import models


# Create your models here.


class User(models.Model):
    gender = (('male', '男'), ('female', '女'))  # 性别选择
    username = models.CharField('用户名', max_length=50, unique=True)  # 用户名
    password = models.CharField('密码', max_length=50)  # 密码
    sex = models.CharField('性别', max_length=10, choices=gender)  # 性别
    introduction = models.TextField('简介')  # 个人简介
    email = models.EmailField(unique=True)  # 邮箱

    school = models.EmailField('学校')
    age = models.IntegerField('年龄')
    grade = models.CharField('年级', max_length=114)
    position = models.CharField('地区', max_length=114)

    head_portrait = models.FileField(upload_to='head_portrait')
